package org.molamil.acto.types {	import org.molamil.acto.core.parsers.ParserError;			/**	 * XXX: Document.	 * 	 * @author Jorge Hernandez	 */	public class RegExpTypeParser extends AbstractTypeParser {						// CONSTANTS				/**		 * @inheritDoc		 */		public static const PRIORITY:uint = 800;				/**		 * @inheritDoc		 */		public static const TYPE:Class = RegExp;						// PROTECTED METHODS				override protected function doParse(value:String):* {						var validationPattern:RegExp = /^\/.+\/(g|i|m|s|x)*$/;						if(validationPattern.test(value)) {								var rePart:String = value.substring(1, value.lastIndexOf("\/"));				var flagsPart:String = value.substring(value.lastIndexOf("\/"));								return new RegExp(rePart, flagsPart);							} else {								throw new ParserError("ERROR: '" + value + "' cannot be parsed into a RegExp");							}					}					}	}